home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
mac
/
Mac_Files
/
Vendor Demos
/
RomMaker
/
TestData
/
Chapter4.txt
< prev
next >
Wrap
Text File
|
1992-09-08
|
28KB
|
542 lines
4
Creating Complex CD-ROM Titles
In making a simple CD-ROM in the previous chapter, we used some key
options when defining the CD-ROM. Most CD-ROMs are in fact made using
just the simple instructions we executed. However, there may be times
where you will need to set some other options when making a specific
CD-ROM. In this section, we elaborate on the various other features of
the RomMaker.
The organization of large number of files into some logical structure is
the responsibility of the file system. This file system allows users to
logically organize their data into folders and files so that users can
locate information quickly. The file system you choose for a CD-ROM is
defined during a step called pre-mastering. With the Personal RomMaker,
you will have four options to choose from:
1. Apple HFS. A CD-ROM can be premastered in the HFS (Apple hier-
archical file system) structure. Such a CD-ROM will behave
like a slower hard disk to any Macintosh computer and support
all the features of the Macintosh interface. In the previous
section, we saw how the RomMaker could make this class of
CD-ROM.
2. ISO 9660. The ISO 9660 specification is an international stan-
dard adopted by most manufacturers including Apple that
defines a folder and file level standard that arrives at a
lowest level common denominator in the area of file system
standard. Files premastered to the ISO 9660 format can be read
on any computer. All Macintosh computers for example recognize
both this and the Apple HFS format. Premastering in this
format allows users to make file contents accessible to any
computer on most operating system. The same ISO 9660 CD-ROM
can be played on a Sun Sparc station, an Apple Quadra, or an
IBM PC 486 running Windows. This interchangibility is unique
to the ISO 9660 standard.
However, ISO 9660 CD-ROM discs forfeit some important advan-
tages of the Macintosh interface:
* Directory depth on an ISO 9660 CD-ROM is limited to
8 directory levels - there can be only 8 levels of
folders within folders.
* Another disadvantage is the strict filenaming con-
vention adopted by the standard to maintain inter-
changibilty between operating systems and hardware.
Only upper case characters A-Z, 0-9 and the _ (0x5
F)
are legitimate filename characters under the ISO
9660 standard. Note the lack of the Space (0x20)
character makes most long Apple filenames invalid.
* If the ISO standard is used to provide file system
compatibility with MS DOS machines, then a further
restriction to the length of the filename must be
imposed. MS-DOS permits only the eight-dot-three
format allowing a maximum of eight characters
followed by a period (.) followed by three charac-
ters. e.g FILECONV.TXT
Although ISO 9660 is a restrictive environment, Apple has
defined some ISO 9660 extensions that allow basic FINDER
information such as file and creator types to be passed
through while maintaining ISO 9660 compatibility. The Personal
RomMaker automatically creates the most compatible premastered
image using these extensions if you choose this file system
standard for your CD-ROM.
3. Hi-Sierra. This standard, the precursor to the ISO 9660 stan-
dard has the same limitations and strengths. It is rarely
used nowadays with over 99.99% of CD-ROMs being ISO 9660 if
interchangibility is a key requirement. For those users with
older hardware bases particularly in the DOS world, this stan-
dard is sometimes used. Unless absolutely mandated, it is
recommended that you never use this pre-mastering option for
your data.
4. Hybrid ISO 9600/Apple HFS. The Personal RomMaker has a truly
unique option that combines the best of all worlds. You can
premaster a data set to run under Apple HFS while still
providing ISO 9660 compatibility for other hardware and oper-
ating systems. On a Macintosh computer, these files appear as
full filenames and custom icons while for other computers such
as MS-DOS, the CD-ROM appears to be an ISO 9600 CD-ROM with
say the eight-dot-three filenames in the limited ISO 9660
character set.
Hybrid discs offer the best of both file structures while
providing a cost effective alternative to producing one disc
for multiple platforms. For example, if you were putting
MacroMind sequences on a CD-ROM, you might wish to use the
same sequences in an MS-DOS environment as well as the Macin-
tosh. The MS-DOS Macromind uses the same data file format as
the Macintosh Macromind allowing a single CD-ROM made to this
hybrid format to be used for both PC and Macintosh applica-
tions.
In the past, producing a hybrid HFS/ISO 9660 CD-ROM required users to
basically partition the CD-ROM into two physical parts, each containing
its own data set. This meant that for hybrid discs, each file system had
only half as much space available - a problem if your data requirements
exceeded 340MB.
The Personal RomMaker is the first premastering system that allows you
to produce a hybrid CD-ROM where both ISO and HFS partitions can use the
full 680MB capacity of the CD-ROM provided of course that the data is
common to both partitions. Hence in this unique system, the data files
are only copied once with the appropriate file system pointing to the
same physical location occupied by the common file. In this section, we
examine how we can make a CD-ROM that contains either the ISO 9660 or
Hi-Sierra file structure or the dual mode ISO 9660/HFS structure.
* Apple HFS format where the CD-ROM looks like an Apple HFS hard
disk when it is mounted. Such a CD-ROM will behave like a
slower hard disk to any Macintosh computer and support all the
features of the Macintosh interface.
A CD-ROM made in HFS format has the following key advantages:
1. Full 31 character file names and custom icons.
2. Aliasing under System 7.
3. Comments and labels allowing each file to be tagged
to allow a convenient way to quickly organize files.
4. No limit on depth of folder structure.
Although HFS discs benefit from the tremendous advantages of
the features of the Macintosh interface, their main weakness
is that they can only be used on Macintosh computers. i.e
these discs are unusable on DOS or Unix machines.
* ISO 9660 format where the CD-ROM conforms to the internation-
ally agreed file system format common to IBM PCs, Apple Macin-
tosh and Unix machines. The Hi-Sierra format, an older variant
of the ISO 9660 format is also available. However, you should
not use this formatting option unless you specifically desire
this format. Typically, over 99.999% of all new CD-ROMs made
conform to the ISO 9660 standard and not the Hi-Sierra stan-
dard.
* Hybrid ISO 9660/Apple HFS format where the CD-ROM conforms to
both the Apple HFS format and the ISO 9660 format. The CD-ROM,
if played on an Apple Macintosh will mount as an HFS volume
while a DOS or Unix machine will mount it as a ISO 9660
volume. This unique feature of the RomMaker allows you to
produce a dual mode CD-ROM targeted at both Apple and non
Apple operating system. We will discuss the production and
benefits of a dual mode CD-ROM in more detail later in this
section.
In this section, we elaborate on the various options available to you
when making the first and most frequently used of these three types of
CD-ROM, namely an Apple HFS only CD-ROM. We will cover the case of
making an ISO 9660 or a ISO/9660/HFS dual mode CD-ROM in the next
chapter.
4.1 Making an ISO 9660 CD-ROM
Making an ISO 9660 CD-ROM is as simple as making an Apple HFS CD-ROM.
The steps are exactly analogous:
1. Define the volume header information for the ISO 9660 CD-ROM.
There are significantly more options in specifying volume
information fields for ISO 9660 than an HFS CD-ROM. For exam-
ple, you can specify copyright, abstract and bibliographic
data for a volume so that you can access this via software
should the need arise. However, all these extra data is
optional and most ISO 9660 CD-ROMs do not specify these
fields.
If you wish to understand the meaning of these optional fields
better, simply position the mouse to the label in front of the
field in question and select the item. The RomMaker help
system will describe each field in detail.
2. Define a Script file as for an Apple HFS volume. The format
for this script is no different than that described earlier.
The structure of the script and its flags are exactly the
same.
3. Premaster the ISO 9660 image to the RomMaker internal hard
disk or DAT tape.
4. Quality assure the image by mounting the premastered ISO
9660/Hi-Sierra image onto the desktop.
5. Replicate the CD-ROM from this premastered image by either
sending the DAT tape to a replication house or replicating
using the RomMaker Write Once system.
To make an ISO 9660/Hi-Sierra CD-ROM, you must of course first define a
volume name, a Rom Content script and select the ISO 9660 or Hi-Sierra
option (Fig 4.1). If you select a radio button other than the Apple HFS
Rom standard, a set of filename standards will be displayed. You will
need to select a filename standard to use when we premaster an ISO 9660
CD-ROM. Note that this filename standard option is only required when
you make an ISO 9660/Hi-Sierra partition on your CD-ROM.
[PICTURE]
Figure 4.1 - ISO 9660 filename standard options
The RomMaker allows you to choose from three major sets of filename
options all related to the ISO 9660 CD-ROM you are about to make:
1. MS-DOS. This option should be used with caution since it pro-
duces a non standard CD-ROM. If this option is selected, the
RomMaker will enforce the MS-DOS filename convention. i.e the
filename follows the eight-dot-three convention with legal
filename characters being A-Z, 0-9, (, ), @, #, $, %, &, !, ~,
<, and >.
Note that the CD-ROM thus produced is not 100% ISO 9660/Hi-
Sierra compliant since ISO only allows the A-Z, 0-9 and _
character in the filename. Selecting this option also turns
off the 8 folder level limit on an ISO 9660/Hi-Sierra disk and
allows you to use extension names in folders.
The MS-DOS driver called MSCDEX is capable of reading this
CD-ROM since its volume structure still conforms to the stan-
dard. It's interchange capability with other systems is of
course not guaranteed.
2. ISO 9660 Level 1. This is the default option that produces a
CD-ROM that exactly conforms to the standards and is univer-
sally interchangeable. In this case, filenames are restricted
not only to the ISO character set of A-Z, 0-9, and _ but an
eight-dot-three limit is placed on the filename so that any
MS-DOS machine will be able to read this CD-ROM. Furthermore a
folder depth limit of eight is enforced as per the ISO recom-
mendation.
3. ISO 9660. This option allows longer filenames (upto 33 charac-
ters) that conform to the ISO filename character set A-Z,0-9,
and _. Furthermore, the folder depth is limited to eight. Note
that operating systems such as DOS do not like these long
filename and you may have difficulty reading the CD-ROMs pro-
duced on such machine. Unix machines of course will not have
any problems reading ISO 9660 CD-ROMs with long filenames.
The biggest problem with making ISO 9660 CD-ROMs on a Macintosh arises
from the fact that the Macintosh file system allows basically any
character for its filenames. For example, the trademark character or a
Space character is a perfectly valid filename character in HFS. When the
RomMaker is making an ISO 9660 CD-ROM, such characters in filenames will
result in an error condition during the pre-mastering stage. RomMaker
strictly enforces the filename standard you will have selected for your
ISO 9660 CD-ROM. When such errors occur, you must either change the
offending file's name or redefine its ISO name using the Script file.
Typically however, you can have thousands of files that do not conform
to the ISO 9660 filename standard you have chosen. To help you make an
ISO 9660 CD-ROM, you can select the Auto-Convert check box underneath
the filename standards and the RomMaker will automatically convert any
non standard filename to the filename standard selected. The basis for
this filename conversion is dependent on the filename standard selected:
* MS-DOS. Any character other than the valid MS-DOS character
set of A-Z, 0-9, (, ), @, #, $, %, &, !, ~, <, and > is
changed to the underscore character'_'. The MS-DOS eight-dot-
three filename restriction is strictly enforced.
* ISO 9660 Level 1. Any character other than A-Z,0-9 or _ is
changed to the _ character. The eight-dot-three filename con-
vention is strictly enforced.
* ISO 9660. This is the same as ISO 9660 Level 1 except that the
filename is restricted in length to 32 characters.
If the autoconvert option is invoked, then automatic renaming of files
to the appropriate filename standard will occur. Consider for example
the filename 'MY FILE~$$$COPY'. This file would be converted to:
* MY_FILE~.$$$ if the MS-DOS filename convention is selected.
* MY_FILE_.___ if the ISO 9660 Level 1 filename convention was
selected.
* MY_FILE____COPY if the ISO 9660 filename convention were
selected.
Note that if you do use the autoconvert option, you must verify that
your application software is operating correctly since it may be expect-
ing the original filename and not the converted filename.
There is one other side effect of the auto-convert option related to
duplicate filenames. Consider the case where there are two Apple files
called
My Filename Version A
My Filename Version B
residing in the same folder. Suppose you now select autoconvert and the
MS-DOS or ISO Level 1 filename convention. In this case, the filename
conversion algorithm would convert both files to the name
MY_FILEN.AME
truncating the trailing edge. This would however result in both files
having the same names on the CD-ROM - a clear irregularity. To solve
this dilemma, the autoconvert algorithm will, in case of duplicate
filename conflict, automatically numerically serialize each filename
sequence where such duplication occurs. Hence the two files would have
the names
MY_FILEN.AME
MY_FILEN.AM1
There is a maximum of 999 such duplicates allowed during this serializa-
tion process.
[PICTURE]
Figure 4.2 - Identifying non-standard files
If you invoke the Auto-Convert or DOS filename option, the dialog box
displayed at the end of the premastering stage will state the number of
files that were converted. Furthermore, you can locate each filename
which was either converted by examining the log file produced when you
make a CD-ROM. For each such file, an '*' is added to the attribute
field to identify the file (Fig 4.2).
Having produced an ISO 9660 image, RomMaker allows you to emulate off
this premastered ISO 9660/Hi-Sierra image. Simply select the Emulate ISO
9660 from Disk Image option from the menu and RomMaker will mount the
pre-mastered image as an ISO volume on the desktop. This is what the
volume will look like if you had actually made the CD-ROM. Note how
filenames have been autoconverted to the filename standard by the Rom-
Maker in order to fit the particular filenaming convention. Once you are
satisfied that the CD-ROM has integrity, you can replicate the CD-ROM as
described in the previous chapter.
4.2 Making a Dual Mode CD-ROM
A unique feature of the RomMaker is the ability to make a dual mode
CD-ROM which behaves as an Apple HFS CD-ROM if plugged into a Macintosh
and like an ISO 9660 CD-ROM if played on any other computer system. This
feature can be very important if your application needs to run on multi-
ple operating systems and requires portability. For example, the Apple
and DOS versions of Macromind Director both use the same binary
compatible animated sequence files. It is thus possible using this fea-
ture of the RomMaker to make just one CD-ROM containing these animated
sequences that both the PC software or the Macintosh software can use.
There is one major option in your Rom Content script file that can be
invoked if you make a dual mode CD-ROM. The RomMaker allows you to
select whether particular files are excluded from each of the parti-
tions. Note that in our single mode CD-ROMs, all files specified in the
script were copied to the destination CD-ROM. However, since a dual mode
CD-ROM has two partitions, you can select whether a set of files/folders
need to be excluded from a particular file system. The format for this
is demonstrated below:
"HD:MAC FOLDER" "MAC FOLDER" -f -x ISO
"HD:DOS FOLDER" "DOS FOLDER" -f -x HFS
"HD:BOTH FOLDER" "BOTH FOLDER" -f
In the above script, the first line in the script use the -x (exclude)
flag to instruct the RomMaker not to enter these files into the ISO 9660
file system partition since they are clearly Macintosh files. In the
second line, the -x flag is used to ensure that the files are not found
in the HFS partition. The last line where no -x flag is found (the
default) means that the files in that folder are found in both parti-
tion.
When a dual mode CD-ROM is made, a particular file is copied only once
and both the file system entries point to just this once occurrence of
the file on the CD-ROM. As a result, if the files are common to both
Apple HFS and ISO 9660, each partition appears to hold the maximum
allowed per CD-ROM, upto 680MB of data.
To make a dual mode CD-ROM, you simply choose the Apple HFS/ISO 9660
file standard option. Since you are making both an ISO 9660 and an Apple
HFS CD-ROM, you will need to set the appropriate options for each file
standard before you premaster. You can then premaster as you would any
other CD-ROM simply by choosing the Make Image option to the appropriate
media.
4.3 Optimizing CD-ROM layout
We have seen how to produce a complex CD-ROM which can work on both DOS
and Apple machines. This section describes how RomMaker emulation system
can help in testing the CD-ROM as well as designing a better software
retrieval system.
The access times of a CD-ROM are not only relatively slow compared to a
hard disk but actually vary by a factor of upto five depending on the
exact location of the data on the CD-ROM. Hence a particular block of
data located close to the inside of the CD-ROM can often be accessed in
150 milliseconds as compared to 750 milliseconds if the same data were
positioned towards the outer extremities of the CD-ROM. This inequality
in performance at the physical level places a premium on how data is
located on the CD-ROM for many applications. For example, an index into
a database is best located close to the inside since it is likely to be
more frequently accessed by the CD-ROM application.
RomMaker provides an empirical system that helps you decide which files
need to be located in the faster part of the CD-ROM. This statistical
collection system is yet another unique feature of the RomMaker.
[PICTURE]
Figure 4.3 - Generating File Statistics
Follow these steps to collect CD-ROM file statistics:
1. Create a premastered image as described earlier.
2. Mount the premastered image onto the desktop using the Emulate
Apple HFS option.
3. Turn on statistic collection by selecting the Emulate Start
Collect statistics choice in the RomMaker menu (Fig 4.3).
4. Quality assure your application in the same manner as a typi-
cal user session. During this period, the RomMaker statistic
collection system will gather data regarding file accesses and
expected performance.
5. Select the Generate Statistics option under the Emulate menu
to output any statistics collected to the statistics file.
RomMaker sorts the collected statistics based on number of
file reads and then outputs them to the file. You can thus
determine which file was most accessed during this typical
user session.
6. View the statistics file using the Examine Statistics file
option.
7. Flush statistics by turning on statistics collection. This
re-initialized the statistic collection system allowing you to
collect statistics on another run of your application.
[PICTURE]
Figure 4.4 - Sample Statistical Output
Figure 4.4 shows sample statistics. Note that statistics are not col-
lected for files with no activity (zero file opens and reads). You
should look at those files not on the list carefully, as they are not
used by your application. Often, these files are remnants of an older
system and can be discarded.
Note the system area is typically the area most frequently accessed by
the application. You cannot change the location of this area. RomMaker
automatically ensures that all volume system information such as the
catalog and extent tree for the HFS file system, the System 6 desktop as
well as the System 7 desktop is always placed in the fastest part of the
CD-ROM. All other files can be relocated to other areas if you desire by
simply reordering the script file.
After determining which files need to be moved closer or further to each
other from the statistics log, you should edit the Rom Content file to
specify the new order for files on the CD-ROM. RomMaker orders files on
the CD-ROM in the order specified in the Rom Content file. Thus, re-
arranging the Rom Content script according to the results of the statis-
tic collection output is all you need to do to optimize the performance
of your CD-ROM. Note you must remake the pre-mastered image using this
new script file before you replicate this CD-ROM.
4.4 Log File
Whenever RomMaker completes a successful Make Rom operation, it produces
a log file containing the names and physical locations of each file on
the CD-ROM. This file, called 'Volume Name'.LOG will be created in the
LOG subfolder of the installation folder. Volume Name is the volume name
you assigned when you premastered the title you are working on. For this
demonstration you will recall we have called it "demo volume".
[PICTURE]
Figure 4.5 - Example of Log file
Figure 4.5 shows a sample log file. For each file on the CD-ROM, it
shows the source of the data, its destination on the CD-ROM, and the
physical location and size of both the resource and data forks on the
CD-ROM. Print this file for your records whenever you successfully mas-
ter a tape or WCD-ROM disc. You can examine this log file by either
selecting from Examine menu or going to the Misc options card and
selecting the examine button next to the error file name.
4.5 Error File.
Whenever RomMaker completes a successful Make WCD-ROM Image operation,
it can optionally produce an error file. This file, called 'Volume
Name.Err' will be created in the LOG subfolder of the installation
folder. This file contains soft errors that RomMaker came across when it
was making the CD-ROM. You should always examine these soft errors
before you replicate a CD-ROM.
[PICTURE]
Figure 4.6 - Example of an Error File
To illustrate, suppose you had copied two aliases onto the CD-ROM. One
alias referred to a file that was also copied to the CD-ROM while the
other contains a reference to a file that was not copied to the CD-ROM.
RomMaker will automatically change the alias of the file that exists on
the CD-ROM so that it is pointing to the correct file. However, the
alias file on the CD-ROM that points to a file not on the CD-ROM cannot
be resolved. In this case, the RomMaker will log this soft error into
the error file.
Another class of error can occur if you use the Icon database option to
automatically reposition icons using the icon database. If an icon for a
file exists in the database but the file itself is not found on the
CD-ROM, RomMaker will signal a soft error to identify the icon in the
database.
You should make it a practice to examine the error file after premaster-
ing to ensure that these soft errors are not an oversight on your part.
You can examine the error file by either selecting from Examine menu or
going to the Misc options card and selecting the examine button next to
the error file name.
4.6 Summary
In this section, we saw how we could premaster and replicate an ISO 9660
or a dual mode Apple HFS/ISO 9660 CD-ROM. The volume identifier fields
applicable to an ISO CD-ROM were described and the process for pre-
mastering these CD-ROM was explored. The unique capabilities of a dual
mode CD-ROM was described along with the options to restrict files to a
particular partition on such a dual mode CD-ROM. In addition, the pro-
cess of improving CD-ROM layout for performance using the unique Rom-
Maker statistical collection system was described.